<template>
    <div></div>
</template>
<script type="text/javascript">
    import { setToken } from '../utils/auth.js';
    export default{
        data(){
            return{
                token:this.$route.query.token
            }
        },
        mounted(){
            if(this.token){
                this.$store.dispatch('setToken',this.token)
                .then(_=>{
                    setToken(this.token);
                    location.href = sessionStorage.source_url;
                    sessionStorage.removeItem('source_url');
                })
            }
        }
    }
</script>